import React from 'react'
import  store from '../../store/store'
import {getMovieListAction} from '../../store/action/movieaction'
export default function Movie() {
  const {count} =  store.getState().count
  const {movieList} = store.getState().movie
  const getmovieListhandle = ()=>{
    store.dispatch(getMovieListAction())
  }
   return (
    <div>
      <hr />
      <h5>我能拿到count的数量：{count}</h5>
      <button onClick={getmovieListhandle}>获取电影列表</button>
      <h1>周末影院电影列表</h1>
      <ul>
       {movieList.map(item=>{
        return <li key={item.albumId}>{item.albumName}</li>
       })}
      </ul>
    </div>
  )
}
